package com.zuipin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.product.TagProduct;
import com.zuipin.mapper.TagProductMapper;
import com.zuipin.service.ITagProductService;

import net.sf.json.JSONObject;

/**
 * 标签-商品业务类实现
 *
 * @ClassName TagProductServiceImpl
 * @author wangcongyi
 * @date 2017年7月12日 上午11:40:35
 */
@Service
public class TagProductServiceImpl implements ITagProductService {

	@Resource
	private TagProductMapper tagProductMapper;

	@Override
	public int insertBatch(List<TagProduct> tagProducts) {
		// TODO Auto-generated method stub
		return tagProductMapper.insertBatch(tagProducts);
	}

	@Override
	public int removeRepeat(JSONObject params,List<String> skus) {
		// TODO Auto-generated method stub
		return tagProductMapper.removeRepeat(params,skus);
	}

	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return tagProductMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(TagProduct record) {
		// TODO Auto-generated method stub
		return tagProductMapper.insert(record);
	}

	@Override
	public int insertSelective(TagProduct record) {
		// TODO Auto-generated method stub
		return tagProductMapper.insertSelective(record);
	}

	@Override
	public TagProduct selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return tagProductMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(TagProduct record) {
		// TODO Auto-generated method stub
		return tagProductMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(TagProduct record) {
		// TODO Auto-generated method stub
		return tagProductMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<String> selectSkusByTagId(Long tagId) {
		// TODO Auto-generated method stub
		return tagProductMapper.selectSkusByTagId(tagId);
	}

}
